{include_core file="lib/header.html" center="center" title="修改头像"}
{include_core file="lib/top_nav.html" }
      <div class="container">
        <div class="inner">
          <div class="con-top clearfix">
            {include_core file="lib/sidebar.html" crumbs_1="center" crumbs_2="user_info"}
            <div class="section-right personal-data">
              <div class="personal-image">
                <div class="top clearfix">
                  <h2>头像</h2>
                </div>
                <div id="flashContent">
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="flashMother" width="571" height="355" align="middle">
                        <param name="movie" value="{$smarty.const.SITE_URL}/flash/avatar.swf">
                        <param name="FlashVars" value="uploadUrl={AnUrl('user/setting/avatar_save')}&amp;avatarPath={user_helper::avatar($user_info.id)}">
                        <param name="quality" value="high">
                        <param name="play" value="true">
                        <param name="loop" value="true">
                        <param name="wmode" value="transparent">
                        <param name="scale" value="noscale">
                        <param name="menu" value="true">
                        <param name="devicefont" value="false">
                        <param name="salign" value="">
                        <param name="allowScriptAccess" value="sameDomain">
                        <embed src="{$smarty.const.SITE_URL}/flash/avatar.swf" scale="noscale" wmode="transparent" quality="high" width="571" height="355" name="flashMother" align="middle" play="true" loop="true" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="uploadUrl={AnUrl('user/setting/avatar_save')}&amp;avatarPath={user_helper::avatar($user_info.id)}">
                    </object>
                </div>
              </div>
              <!--personal-image  end-->
            </div>
          </div>
        <!--personal-infor  end-->
        </div>
        <!--personal-data  end-->
        
      </div>
      <!--con-top  end-->
    </div>
    <!--inner  end-->
    </div>
    <!--container  end-->
    <script type="text/javascript">
      function updateAvatar(str)
      {
      //$(".avatar>img").attr('src', str);
      location.reload();
      }

      // flash control
      function thisMovie(movieName) {
        if (window.document[movieName]){
           return window.document[movieName];
         }
         if (navigator.appName.indexOf("Microsoft Internet")==-1) {
           if ($.browser.version >= 9) {
             return window[movieName][0];
           }
           if (document.embeds && document.embeds[movieName]){
             return document.embeds[movieName];
           } else {
             return document.getElementById(movieName);
           }
       }
      }

      //截图上传状态处理
      function uploadevent(status)
      {
         var status = parseInt(status);

         switch(status){

            case 1:
                showMsg('图片更新成功', 'ok');
                window.location.reload();
            break;

            case 2:
                if(confirm('js call upload')){
                    return 1;
                }else{
                    return 0;
                }
            break;

            case -1:
                showMsg('cancel!');
                window.location.href = "#";
            break;
            case -2:
                alert('upload failed!');
                window.location.href = "#";
            break;

            default:
                showMsg(typeof(status) + ' ' + status,'err');
        } 
      }
    </script>
{include_core file="lib/footer.html"}
